//
// Created by wxd on 2025/8/10.
//

#pragma once

#ifndef TRIANGLE_H
#define TRIANGLE_H

#include "BaseGeometry.h"
#include <vector>
#include "../glFramework/texture/Texture.h"
#include "glm/glm.hpp"
#include "../application/app/Application.h"

class Triangle : public BaseGeometry {
public:
    Triangle() {
        m_DrawMode = GL_TRIANGLES;
        m_GeometryType = GeometryType::TRIANGLE;
        if (EngineApp.isGLInited()) {
            BaseGeometry::initVAO();
        }
    }

    Triangle(DrawType type, GLenum mode) {
        m_DrawType = type;
        m_DrawMode = mode;
        m_GeometryType = GeometryType::TRIANGLE;
        if (EngineApp.isGLInited()) {
            BaseGeometry::initVAO();
        }
    }

    Triangle(const std::vector<glm::vec3>& vertex, const std::vector<float>& uvs);

    std::unique_ptr<BaseGeometry> clone() const override {
        return std::make_unique<Triangle>(*this);
    }
};

#endif //TRIANGLE_H
